package com.freedom.common.core.enums;

import com.freedom.common.core.result.BaseResultCode;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@AllArgsConstructor
@NoArgsConstructor
public enum AuthResultCodeEnum implements BaseResultCode, Serializable {

    INVALID_TOKEN("401", "token无效或已过期"),
    ACCESS_UNAUTHORIZED("403", "访问未授权"),

    LOGIN_PARAM_ERROR("U1000", "登录失败，请求参数错误"),
    LOGIN_CLIENT_ERROR("U1001", "用户端错误"),
    LOGIN_ERROR("U1002", "用户登录异常"),
    ACCOUNT_NOT_EXIST("U1003", "用户不存在"),
    ACCOUNT_LOCKED("U1004", "用户账户被冻结"),
    ACCOUNT_LOG_OUT("U1005", "用户账户已注销"),
    ACCOUNT_EXIST("U1006", "用户账号已存在"),
    ACCOUNT_TIME_OUT("U1007", "用户账户已过期"),
    ACCOUNT_ERROR("U1008", "用户账户异常"),
    AUTH_WAY_ERROR("U1009", "认证方式不正确"),
    LOG_OUT_SUCCESS("U1010", "注销成功"),


    CAPTCHA_CODE_NOT_BLANK("A2001", "验证码不存在"),
    CAPTCHA_CODE_TIME_OUT("A2002", "验证码已过期"),
    CAPTCHA_CODE_ERROR("A2003", "验证码输入错误"),
    ;

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    private String code;

    private String msg;
}
